
#ifndef PHP_SHD_H
#define PHP_SHD_H

extern zend_module_entry shd_module_entry;
#define phpext_shd_ptr &shd_module_entry

#ifdef PHP_WIN32
#	define PHP_SHD_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
#	define PHP_SHD_API __attribute__ ((visibility("default")))
#else
#	define PHP_SHD_API
#endif

#ifdef ZTS
#include "TSRM.h"
#endif

PHP_MINIT_FUNCTION(shd);
//PHP_MSHUTDOWN_FUNCTION(shd);
//PHP_RINIT_FUNCTION(shd);
//PHP_RSHUTDOWN_FUNCTION(shd);
PHP_MINFO_FUNCTION(shd);

ZEND_FUNCTION(shd_params);
ZEND_FUNCTION(shd_hashtable);
ZEND_FUNCTION(shd_foreach);
ZEND_FUNCTION(shd_array);

ZEND_METHOD(myclass, public_method);
ZEND_METHOD(parent_myclass, public_method);

int php_sample_print_zval(zval **val TSRMLS_DC);

/*
  	Declare any global variables you may need between the BEGIN
	and END macros here:

ZEND_BEGIN_MODULE_GLOBALS(shd)
	long  global_value;
	char *global_string;
ZEND_END_MODULE_GLOBALS(shd)
*/

/* In every utility function you add that needs to use variables
   in php_shd_globals, call TSRMLS_FETCH(); after declaring other
   variables used by that function, or better yet, pass in TSRMLS_CC
   after the last function argument and declare your utility function
   with TSRMLS_DC after the last declared argument.  Always refer to
   the globals in your function as SHD_G(variable).  You are
   encouraged to rename these macros something shorter, see
   examples in any other php module directory.
*/

#ifdef ZTS
#define SHD_G(v) TSRMG(shd_globals_id, zend_shd_globals *, v)
#else
#define SHD_G(v) (shd_globals.v)
#endif

#endif	/* PHP_SHD_H */

